{%ErrorHandler->getSuccess assign='make'%}
{%ErrorHandler->getLastError assign='error'%}

{%if $make%}
{%* THANKS TO USER FOR SUBSCRIBTION *%}

{%if $make.code eq 'registered'%}
<p style="margin: 20px 0;">
   We are happy! Now you are our subscriber!<br />
   BUT, you need to approve your subscription. Please - check your email!
</p>
{%/if%}

{%if $make.code eq 'confirmed'%}
<p style="margin: 20px 0;">
   Congratulations! You really have access to your email.
</p>
{%/if%}

{%if $make.code eq 'subscribed'%}
<p style="margin: 20px 0;">
   Congratulations! You've added to the subscribers list.
</p>
{%/if%}

{%if $make.code eq 'unsubscribed'%}
<p style="margin: 20px 0;">
   We are really sad! You have gone!
</p>
{%/if%}

{%else%}
   {%if $error%}
      {%* SHOW TO USER THAT NOT EVERYTHING IS OK *%}
      <p style="color: red;">You have some errors in the filled form</p>
   {%/if%}
   {%* SUBSCRIPTION FORM *%}

   <form action="{%$category->href%}" method="post">
      <label>Your name:</label> <input type="text" name="f[name]" /><br />
      <label>Your email:</label> <input type="text" name="f[email]" /><br />
      <input type="submit" value="Subscribe" />
   </form>

{%/if%}